//引入路由组件
import Home from '@/pages/Home';
import Topic from '@/pages/Topic';
import Category from '@/pages/Category';
import Cart from '@/pages/Cart';
import User from '@/pages/User';
import Brand from '@/pages/GoodsDetail/Brand.vue'
import MyPopup from '@/pages/MyPopup';
import Channel from '@/pages/Channel';
import GoodsDetail from '@/pages/GoodsDetail/GoodsDetail';

//路由配置信息
export default [
    {
        path: '/',//访问根路径为首页
        redirect: '/home'
    },
    {
        path: '/home',//首页
        name: 'home',
        component: Home,
        children: [
            {
                path: 'popup',
                name: 'MyPopup',
                component: MyPopup,
            }
        ]
    },
    {
        path: '/topic',//主题
        name: 'topic',
        component: Topic
    },
    {
        path: '/category',
        name: 'category',
        component: Category,
        children: [
            {
                path: 'popup',
                name: 'CMyPopup',
                component: MyPopup
            }
        ]
    },
    {
        path: '/cart',
        name: 'cart',
        component: Cart,
    },
    {
        path: '/user',
        name: 'User',
        component: User,
    },
    {
        path: '/brand/:id',
        name: 'Brand',
        component: Brand
    }, {
        path: '/channel',
        name: 'channel',
        component: Channel,
    }, {
        path: '/goodsDetail/:id',
        name: 'GoodsDetail',
        component: GoodsDetail
    }
]